package com.mysecurity.controller;

import com.mysecurity.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

/**
 * @author Jane
 * @date 2024-07-11 16:11
 */
@Tag(name="仓库管理",description = "仓库管理模块的Controller")
@RestController
@RequestMapping("/storage")
public class StorageCotroller {

    @Operation(description="获取仓库列表")
    @PostMapping("/list")
    public Result list(){
        String list ="{'sid':1,'sname':'华南仓'}";
        return Result.ok().message("成功获取仓库列表");
    }

    @Operation(description="删除仓库信息")
    @Parameters(@Parameter(name = "仓库id",description = "仓库id",required = true))
    @DeleteMapping("/del")
    public Result del(@RequestParam(name = "sid",required = true) String sid){

        return Result.ok().message("仓库信息已删除");
    }
}